<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>系统菜单管理</title>
    <meta name="description" content="">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/resources/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/resources/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <script src="/resources/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/resources/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/resources/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="/resources/css/app.css">
    <link rel="stylesheet" href="/resources/css/employee.type.css">
    <script src="/resources/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
<script src="/resources/js/theme.js"></script>
<div class="am-g tpl-g">
    <%--头部开始--%>
    <%@include file="header.jsp" %>
    <%--头部结束--%>

    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">

        <div class="container-fluid am-cf">
            <div class="row">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                        <div class="page-header-heading"><span class="am-icon-file-excel-o page-header-heading-icon"></span> 登录日志
                            <small>login History</small>
                        </div>
                        <p class="page-header-description">登录日志</p>
                    </div>
                </div>
                <div class="am-u-lg-3 tpl-index-settings-button">
                    <%--<button type="button" class="page-header-button"--%>
                            <%--data-am-modal="{target:'#type-model',width:600}"><span--%>
                            <%--class="am-icon-paint-brush">添加一级菜单</span></button>--%>
                </div>
            </div>

        </div>

        <div class="row-content am-cf">
            <div class="row widget  am-cf" id="content">
                <!--<div class="am-u-md-1  am-u-lg-2"></div>-->
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <%--新的菜单模式--%>

                    <table width="100%" class="am-table am-table-bordered am-table-compact tpl-table-black "
                           id="example-r">
                        <thead>
                        <tr>
                            <th>登录时间</th>
                            <th>登录地点</th>
                            <th>登录ip</th>
                            <th>登录账号</th>
                            <th>登录名</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${pageInfo.list}" var="msg" varStatus="i">
                        <tr>
                            <td><fmt:formatDate type="both" value="${msg.ipdate}" /></td>
                            <td>${msg.ipaddress}</td>
                            <td>${msg.ip}</td>
                            <td>${msg.reserve2}</td>
                            <td>
                                    ${msg.reserve3}
                            </td>
                        </tr>


                        </c:forEach>

                    </table>


                </div>
                <!--分页插件Start-->
                    <!-- 分页开始 -->
                    <div class="am-u-lg-12 am-cf pageInfoTotal">

                        <!-- 分页文字信息，其中分页信息都封装在pageInfo中 -->
                        <div class="col-md-6 ">
                            当前第：${pageInfo.pageNum }页，总共：${pageInfo.pages }页，总共：${pageInfo.total }条记录
                        </div>
                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                                <!-- 首页 -->
                                <li><a href="/msg/loginhistory?pn=1">首页</a></li>
                                <!-- 上一页 -->
                                <c:if test="${pageInfo.hasPreviousPage }">
                                    <li>
                                        <a href="/msg/loginhistory?pn=${pageInfo.pageNum-1 }"
                                           aria-label="Previous">
                                            <span aria-hidden="true">&laquo;</span>
                                        </a>
                                    </li>
                                </c:if>
                                <!-- 循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接 -->
                                <c:forEach items="${pageInfo.navigatepageNums }" var="page_Num">
                                    <c:if test="${page_Num == pageInfo.pageNum }">
                                        <li class="am-active"><a
                                                href="/msg/loginhistory?pn=${page_Num }">${page_Num }</a>
                                        </li>
                                    </c:if>
                                    <c:if test="${page_Num != pageInfo.pageNum }">
                                        <li>
                                            <a href="/msg/loginhistory?pn=${page_Num }">${page_Num }</a>
                                        </li>
                                    </c:if>
                                </c:forEach>
                                <!-- 下一页 -->
                                <c:if test="${pageInfo.hasNextPage }">
                                    <li>
                                        <a href="/msg/loginhistory?pn=${pageInfo.pageNum+1 }"
                                           aria-label="Next">
                                            <span aria-hidden="true">&raquo;</span>
                                        </a>
                                    </li>
                                </c:if>
                                <!-- 末页 -->
                                <li><a href="/msg/loginhistory?pn=${pageInfo.pages }">末页</a></li>
                            </ul>
                        </div>
                    </div>
                    <!-- 分页结束 -->
            </div>
        </div>
    </div>



    <script src="/resources/js/amazeui.min.js"></script>
    <script src="/resources/js/amazeui.datatables.min.js"></script>
    <script src="/resources/js/dataTables.responsive.min.js"></script>
    <script src="/resources/js/app.js"></script>


</body>

</html>
